home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / NEWSOFT / AUGUST / WORKDISC / !Forthmacs / risc_os / auto next >
Text File  |  1997-07-22  |  2KB  |  60 lines

  1. \ autoload file
  2. \ hs 22.02.97
  3. only forth also definitions hidden also  system also decimal
  4. [ifdef] floats-on    floats-on [then]
  5.  
  6. : ?load-file    ( str -- )
  7.     dup file-exists? if ??cr load-file else cr ." --> Can't load " ". then ;
  8.  
  9. \ ********************************************************************************************
  10. \ This part between the star lines should not be removed, in case you find a bug or would like
  11. \ to include a feature, let me know it.  hs 21.11.96
  12. : auto-install
  13.     p" cd <Forthmacs$Dir>"  "cli drop
  14.     p" enumdir risc_os.installjob fileliste" "cli drop
  15.     p" fileliste" read fopen
  16.     astring astring locals| cmd job fd |
  17.     begin    job fd fgetline
  18.     while    p" risc_os.installjob." cmd "copy  job cmd "cat ??cr cr cmd load-file
  19.     repeat
  20.     fd fclose    
  21.         p" wipe fileliste ~C~V"                "cli drop
  22.     p" Ifthere risc_os.installjob.* then wipe risc_os.installjob.* ~C~V" "cli drop
  23.     p" back"                    "cli drop
  24.     ??cr ;
  25. auto-install  forget auto-install
  26. \ *******************************************************************************************
  27.  
  28.  
  29. libcall: emacs
  30.  
  31. : cli-undefined
  32.     astring astring locals| command line |
  33.     command "copy  p"  " command "cat  get-tail command "cat  command "cli
  34.     if command (interpret-do-undefined else .cli-out then
  35.      ; ' cli-undefined is interpret-do-undefined
  36. : ?fload    \ name
  37.     blword ?load-file ;
  38. : edit        ( filename -- error? )
  39.     astring "move astring astring locals| oldfilepath command filename |
  40.     p" File$Path" getenv ?dup 0= if nullstring then oldfilepath "copy
  41.     p" Set File$Path @.,<Forthmacs$Dir>.risc_os.bin.cmd." "cli drop
  42.     p" emacs " command "copy  filename command "cat  command "shell
  43.     oldfilepath c@
  44.     if    p" Set File$Path "  command "copy   oldfilepath command "cat
  45.     else    p" Unset File$Path" command "copy
  46.     then command "cli drop
  47.     erase-screen ;
  48. : ed    blword edit ;
  49. only forth also definitions
  50.  
  51. p" Forthmacsoptions" get-env-var d# 255 and
  52. \ dup d# 01 and [if] ?fload lib.compatible    ??cr [then]
  53. dup d# 16 and [if] ?fload blocks         ??cr [then]
  54. dup d# 08 and [if] ?fload modem            ??cr [then]
  55. dup d# 64 and [if] ?fload lib.clock        ??cr [then]
  56. dup d# 04 and [if] ?fload tracer        ??cr [then]
  57. dup d# 02 and [if] ?fload debugger        ??cr [then]
  58. dup d# 32 and [if] ?fload profiler        ??cr [then]
  59. dup d# 128 and [if] ?fload optimizer        ??cr [then]
  60. drop